from django.db import models

# Create your models here.
class Cita(models.Model):
    autor = models.CharField(max_length=31, blank=True, null=True)
    texto = models.TextField()

    def __unicode__(self):
        texto = self.texto
        if self.autor and self.autor != "":
            if texto[-1] != '.':
                texto += '.'
            texto += " " + self.autor
        return texto

